<template>
  <nav class="title">
    <span class="active">监考次数：{{listData.length}}</span>
    <div class="search-box pr"><Search :search="searchInfo" @new_search="getSearch" /></div>
    <span class="active" v-show="!addHidden" @click="routerTo">
      <img :src="imgs.calendar" alt="" class="add-icon">
    </span>
  </nav>
</template>
<script>
import Search from '../../../../../components/search.vue'
export default {
  props:["searchInfo","pageInfo","selectData","getListData","addHidden","listData"],
  components: {Search},
  name: "",
  data() {
    return {
      imgs:{
        calendar:require('../../../../../assets/images/home/icon-calendar.png')
      },
    };
  },
  methods: {
    showAcheet(){
      this.$store.state.dias.acheet.show=true
      this.$store.state.dias.acheet.columns=this.selectData.data1.map(val=>val.years)
      this.$store.state.dias.acheet.confirm=this.confirm
    },
    confirm(val){
      this.$set(this.searchInfo,'year',val)
      this.$store.state.dias.acheet.show=false
      this.getSearch()
    },

    getSearch(){
     this.pageInfo.page=1
     this.getListData()
    },

    routerTo(){
      // this.$router.push("/workflow/invigilate/records")
      _g.toMessage({error:2,msg:"功能升级中..."})
    }
  },
  created() {}
};
</script>
<style lang="scss" scoped>
.title{
    font-size: 16px;
    color: #fff;
    line-height: 90px;
    height: 90px;
    background-color: #00998d;
    display: flex;
    padding:0 20px;
  }
  .search-box{
    // width:calc(100% - 220px);
    flex-grow: 1
  }

  .active:active{
    background-color: transparent;
  }
  .active:nth-of-type(2){
    margin-left: auto;
  }
  .add-icon{
    width: 50px;
    height: 50px;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
  }

</style>